<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="<?=$this->styleurl?>/images/index.css" type=text/css rel=stylesheet />
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 
            CALLPADDING="0">
              <TBODY>
			                <TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left width="100%" bgColor=#ffffff height=30>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="85%"><img src="<?=$this->styleurl?>/images/url_01.gif" width="7" height="10" />&nbsp;<?php if($this->action == "add") echo "<strong>添加文章</strong>";else echo "<strong>编辑文章</strong>";?></td>
                    <td width="15%">&nbsp;</td>
                  </tr>
                </table>
                </TD>
              </TR>
<?php 			  
if($this->action == 'add'){
?>
<form id="form1" name="form1" method="post" action="<?=$this->baseUrl?>/admin/singlepage/submitsp">
			<TR BORDER="0" WIDTH="100%">
			                  <TD height="20"><span style="PADDING-LEFT: 8px; PADDING-TOP: 8px">标　题：
                                  <input name="sp_title" type="text" id="sp_title" size="50" />
              </span>			                  </TD>
    </TR>
		<TR BORDER="0" WIDTH="100%">
            <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top align=left bgColor=#ffffff height=20>内　容：</TD>
    </TR>
		<TR BORDER="0" WIDTH="100%">
           <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top align=left bgColor=#ffffff height=30>
			<?=$this->fckeditor?>
			</TD>
              </TR>
			<TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left bgColor=#ffffff height=30><span class="help">
                  <input type="image" src="<?=$this->styleurl?>/images/submit.gif" align="absmiddle" border="0" name="submit" onclick="return checkform(this.form)" />
                  <input name="action" type="hidden" id="action" value="add" />
                </span></TD>
              </TR>
 </form>
 <script language="javascript">
function checkform(theform)
{
if(theform.sp_title.value=="")
  {
  alert("文章标题不能为空！");
  theform.sp_title.focus();
  return false;
  }
if(theform.sp_title.value.length > 100)
	{
		alert("文章标题太长哦!!");
		theform.sp_title.focus();
		return false;
	}
return true;
}
</script>
 <?php 
 }
if($this->action == "edit"){
 ?>
 <form id="form1" name="form1" method="post" action="<?=$this->baseUrl?>/admin/singlepage/submitsp">
			<TR BORDER="0" WIDTH="100%">
			                  <TD height="20"><span style="PADDING-LEFT: 8px; PADDING-TOP: 8px">标题：
                                  <input name="sp_title" type="text" id="sp_title" value="<?php echo $this->sp_info["sp_title"];?>" size="50" />
              </span>			</TD>
    </TR>
			<TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left bgColor=#ffffff height=20>内容：</TD>
    </TR>
		<TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top align=left bgColor=#ffffff height=30>
                 <?=$this->fckeditor?>
				</TD>
              </TR>
			<TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left bgColor=#ffffff height=30><span class="help">
                  <input type="image" src="<?=$this->styleurl?>/images/submit.gif" align="absmiddle" border="0" 
                        name="submit" onclick="return checkform(this.form)" />
                  <input name="action" type="hidden" id="action" value="edit" />
                  <input name="sp_id" type="hidden" id="sp_id" value="<?php echo $this->sp_info["sp_id"];?>" />
                </span></TD>
              </TR>
 </form>
<script language="javascript">
function checkform(theform)
{
if(theform.sp_title.value=="")
  {
  alert("文章标题不能为空！");
  theform.sp_title.focus();
  return false;
  }
if(theform.sp_title.value.length > 100)
	{
		alert("文章标题太长哦!!");
		theform.sp_title.focus();
		return false;
	}
return true;
}
</script>
<?php
	}
?>
      </TABLE>
</body>
</html>